#ifndef IODEV_H
#define IODEV_H


#define PORT_KEYDAT				0x0060
#define PORT_KEYSTA				0x0064
#define PORT_KEYCMD				0x0064
#define KEYSTA_SEND_NOTREADY	0x02
#define KEYCMD_WRITE_MODE		0x60
#define KBC_MODE				0x47


#define KEYCMD_SENDTO_MOUSE		0xd4
#define MOUSECMD_ENABLE			0xf4


typedef struct {
	unsigned char buf[3] , phase ; //解码用的
	int x ,y , btn ; 
} MOUSE_INFO ;


void wait_KBC_sendready (void ) ;
void enable_mouse (void );
void init_keyboard (void);
int mouse_decode (MOUSE_INFO * info , unsigned char data );


#endif   
  